Fix chat timeline row height estimation#1093
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
needs tests. also I think the estimation of |
3da112a to
308e1bb
Compare
308e1bb to
48a41c6
Compare
I added tests both unit and a browser render test. Let me know in case the browser test was a bit much and i can drop it. |
What Changed
Improved chat timeline virtualization height estimation by switching from coarse message-only estimates to row-aware estimates for user messages, assistant messages, work groups, proposed plan cards, and the working indicator.
Assistant row estimates now also account for markdown structure and changed-files summaries, while proposed plans and work groups use estimators closer to their actual rendered shape.
Fixes: #1035
This PR supersedes #1054.
Why
Some chat rows were being underestimated, which could cause overlapping content and visible scroll instability in virtualized threads.
UI Changes
Same as Why ^
Checklist
Note
Fix chat timeline row height estimation across message, work, and proposed-plan rows
estimateTimelineRowHeightintimelineHeight.tsas a unified estimator replacing the previous per-message approach, covering work groups, proposed plans, working rows, and messages.estimateAssistantMarkdownStructureBonusPxand text normalization before line-wrapping.resolveMessagesTimelineRowsinMessagesTimeline.logic.tsto produce typedMessagesTimelineRowobjects;MessagesTimeline.tsxuses these for virtualizer size estimation and rendering.MessagesTimeline.browser.tsxthat measures actual rendered row heights and asserts parity with the estimator across desktop/mobile viewports and expand/collapse interactions.Macroscope summarized 48a41c6.